<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>放大镜</title>
    <link rel="stylesheet" href="./css/fdj.css">
    <script src="./js/jquery.js"></script>
    <script src="./js/fdj.js"></script>
    <script src="./js/index copy.js"></script>
    <script src="./js/js/layer/layer.js"></script>


</head>

<body>

    <div class="louceng">

        <li> <img src="./images/gwcjpg.jpg" alt=""></li>
        <li></li>
        <li><img src="./images/sm.jpg" alt=""></li>
        <li><img src="./images/jl.jpg" alt=""></li>
        <li class="jt"><img src="./images/jt.jpg" alt=""></li>
    </div>
    <div class="actived">
        <li class="active1"><img src="./images/头像.jpg" alt="">
            <div class="talk"><img src="./images/talk.jpg" alt=""></div>
        </li>
    </div>



    <div class="head clearfix">
        <div class="head1">
            <div class="txt">
                正品保障,免息分期!

            </div>

            <ul>
                <a href="./login.html">
                    <li>请登录</li>
                </a>
                <li style="color: #cc5252;">注册即送6800元大礼包</li>
                <a href="./cart.html">
                    <li style="color: #cc5252;">购物车</li>
                </a>
                <li>客户服务</li>
                <li>会员福利</li>
                <li>ENGLISH</li>
            </ul>

        </div>
        <div class="logo">

            <a href="./首页.html"> <img src="./images/logo.jpg" alt=""></a>
            <img src="./images/amn.jpg" alt="">

            <div class="search">
                罗总你别以为你长得帅就嚣张

            </div>

        </div>
        <div class="logo1"><img src="./images/splite.jpg" alt=""></div>
    </div>


    <div class="content clearfix">
        <div id="box">
            <div class="middleImg">
                <img src="images/images1/s2-3.jpg" />
                <div class="middleArea"></div>
            </div>
            <div class="small">
                <ul>
                    <li><img src="images/images1/s2-3.jpg" /></li>
                    <li><img src="images/images1/s2-4.jpg" /></li>
                    <li><img src="images/images1/s3-2.jpg" /></li>
                    <li><img src="images/images1/s4-1.jpg" /></li>
                    <li><img src="images/images1/s4-4.jpg" /></li>
                </ul>
            </div>
            <div class="bigArea">
                <img class="bigImg" src="images/images1/s4-4.jpg" />
            </div>
            <div class="logo2"><img src="./images/双11.png" alt=""></div>
            <div class="logo3"><img src="./images/Snipaste_2021-10-28_11-29-33.jpg" alt=""></div>
            <p class="txt1"> 收藏&nbsp;|&nbsp;分享</p>
        </div>



        <div class="txtlist ">
            <p class="title">Armani阿玛尼满天星镶钻星空AR1926轻奢气质石英女表佟丽娅同款</p>
            <div class="upper_xuyan">满天星璀璨镶钻星空表盘，展现女神优雅气质，选用钢和金钢混合精制而成，表盘饰以星空般的水晶点缀。蝴蝶双按扣，佩戴便捷。<span
                    class="js_more CUSTOMER-SERVICE">咨询优惠</span></div>

            <div class="upper_model clearfix">
                <div class="fl upper_model_a"><span>型号:</span><span>AR1926</span></div>
                <div class="fl upper_model_b"><span>编号:</span><span>51784</span></div>
                <div class="fl upper_model_c"><span>品牌:</span><span>阿玛尼</span></div>
                <div class="fr upper_model_d"><span>销量:</span><span>1735</span></div>
            </div>

            <div class="boximg"><img src="./images/price.jpg" alt="">

                <div class="imgbox"><img src="./images/$.jpg" alt=""></div>


            </div>
            <div class="upper_give clearfix">
                <div class="upper_give_left fl">配送</div>
                <div class="upper_give_right fl"><i>（顺丰包邮）</i> 17:30前支付，预计1-3个工作日内发货，支持货到付款 </div>
            </div>
            <div class="promise clearfix">
                <div class="left fl">承诺</div>
                <div class="right fl">
                    <li class="fl"><i></i> <span class="">正品保障</span>
                        <div class="popup" style="display: none;">全站自营直采，高于瑞士国家标准的进出仓全检机制，万表10年零假货投诉。</div>
                    </li>
                    <li class="fl"><i></i> <span class="">正规发票</span>
                        <div class="popup" style="display: none;">提供国家税务局认可的正规发票，具有售后维权法律效力。</div>
                    </li>
                    <li class="fl"><i></i> <span class="">假一赔三</span>
                        <div class="popup" style="display: none;">万表自营新表10年累计交易超50万枚腕表，正品无假货，如有售假三倍赔偿。</div>
                    </li>
                    <li class="fl"><i></i> <span class="">7天退换</span>
                        <div class="popup" style="display: none;">无理由退换：撕开贴膜及特卖、预售、定制等商品不支持；质量退换：非人为机芯故障或商品制造缺陷</div>
                    </li>
                    <li class="fl"><i></i> <span class="">全球联保</span>
                        <div class="popup" style="display: none;">800+家售后服务点，完善的售后保障，可享受品牌全球联保服务。</div>
                    </li>
                    <li class="fl"><i></i> <span class="">实体体验</span>
                        <div class="popup" style="display: none;">多家线下体验中心，互联网+新零售。</div>
                    </li>
                    <li class="fl"><i></i> <span class="">闪电发货</span>
                        <div class="popup" style="display: none;">每天17：30前下单，可当天发货。</div>
                    </li>
                    <li class="fl"><i></i> <span class="">货到付款</span>
                        <div class="popup" style="display: none;">收到货验货后再支付，可刷卡、现金、转账。</div>
                    </li>
                </div>
            </div>

            <div class="service clearfix">
                <div class="left fl">服务</div>
                <div class="right fl"> <a class="fl" href="./首页.html" target="_blank"><span>万表名匠提供全国联保</span><i
                            class="icon-d-new_choice"></i></a> <a class="fl" href="./login.html"
                        target="_blank"><span>100%正品二手表库</span><i class="icon-d-new_choice"></i></a> </div>
                <div class="servicePopup">该产品享有2年名匠保修服务</div>
            </div>

            <div class="upper_style clearfix">
                <div class="upper_style_left fl">款式</div>
                <div class="upper_style_right fl"> <a href="/goods/51783" class="fl "><span
                            class="upper_style_right_img fl"><img src="./images/dmjpg.jpg" alt=""></span> <span
                            class="upper_style_right_text fl">钢 白色 镶钻 不锈钢</span> </a> <a href="/goods/51784"
                        class="fl upper_style_right_action"><span class="upper_style_right_img fl"><img
                                src="./images/dmjpg.jpg" alt=""></span> <span class="upper_style_right_text fl">钢 白色 镶钻
                            不锈钢</span>
                        <div class="tag icon-a-o-arrow-black"></div>
                    </a> <a href="/goods/75917" class="fl "><span class="upper_style_right_img fl"><img
                                src="./images/dmjpg.jpg" alt=""></span> <span class="upper_style_right_text fl">不锈钢
                            白色</span> </a> </div>
            </div>


            <div class="upper_number clearfix">
                <div class="upper_number_left fl">数量</div>
                <div class="upper_number_right fl">
                    <div class="upper_number_right_a fl"> <span class="fl reduce" data-type="subtract"
                            id="btn1">-</span> <input type="text" value="1" class="cont fl" id="count"
                            data-realcount="2" data-virtualcount="33"
                            onkeyup="this.value=this.value.replace(/[^\d]/g,'') "
                            onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"> <span class="fl plus"
                            data-type="add" data-saletype="3" id="btn">+</span></div>
                </div>
                <div class="upper_number_count fl">库存紧张</div>
            </div>
            <div class="upper_button clearfix">
                <div class="upper_button_a page fl js_purchase">立即购买</div>



                <div class="qr-code fl">
                    <div class="icon"> <img src="./images/ewm5.png" alt=""></div>
                    <em class="text">点击领优惠</em>
                    <div class="qr-code-popup">
                        <e class="qr-code-tip">扫码下单更优惠</e>
                    </div>
                    <div class="qr-code-container second"> </div>
                </div>
            </div>
        </div>
    </div>

    </div>

    <div class="upper_button_b page fl" id="add">加入购物车</div>


</body>
<div class="footer1">
    <div class="ft1"><img src="./images/hb.png" alt="">
        <button>×</button>
    </div>

    <div class="boximg1"><img src="./images/datu.jpg" alt="">

        <img src="./images/datu(6).jpg" alt="">
    </div>

</div>

<div class="footer ">
    <div class="foot main">
        <div class="foot-top">
            <div class="foottop-Lt ">
                <p class="p1">客服电话</p>
                <p class="p2">400-883-2688</p>
                <p class="p3">外呼电话020-83931899</p>
                <span>售后维修</span>
            </div>
            <div class="foottop-Md ">
                <dl>
                    <dt>新手指南</dt>
                    <dd>注册新会员</dd>
                    <dd>购物流程</dd>
                    <dd>手表小知识</dd>
                    <dd>退换货流程</dd>
                </dl>
                <dl>
                    <dt>新手指南</dt>
                    <dd>注册新会员</dd>
                    <dd>购物流程</dd>
                    <dd>手表小知识</dd>
                    <dd>退换货流程</dd>
                </dl>
                <dl>
                    <dt>新手指南</dt>
                    <dd>注册新会员</dd>
                    <dd>购物流程</dd>
                    <dd>手表小知识</dd>
                    <dd>退换货流程</dd>
                </dl>
                <dl>
                    <dt>新手指南</dt>
                    <dd>注册新会员</dd>
                    <dd>购物流程</dd>
                    <dd>手表小知识</dd>
                    <dd>退换货流程</dd>
                </dl>
                <dl>
                    <dt>新手指南</dt>
                    <dd>注册新会员</dd>
                    <dd>购物流程</dd>
                    <dd>手表小知识</dd>
                    <dd>退换货流程</dd>
                </dl>
            </div>
            <img src="./images/(60).png" class="footimg fl">
        </div>
        <div class="foot-btom">
            <div class="footTxt">
                <a href="#">手表维修</a>
                <a href="#">加盟网</a>
                <a href="#">招聘</a>
                <a href="#">装修</a>
                <a href="#">世界名表</a>
                <a href="#">法律咨询</a>
                <a href="#">车主指南</a>
                <a href="#">天气预报</a>
                <a href="#">房产网</a>
                <a href="#">孔夫子旧书网</a>
                <span>></span><br>
                <p class="txtp">
                    <a href="#">供求信息网</a>
                    <a href="#">苹果绿养生网</a>
                    <a href="#">品牌网</a>
                    <a href="#">香烟网</a>
                    <a href="#">企业名录</a>
                    <a href="#">千图</a>
                </p>
            </div>

        </div>
    </div>
</div>

</div>

</div>



<div class="endimg">
    <div class="main eImg">
        <a href="#">
            <img src="./images/(65).png" class="img1 fl">
        </a>
        <a href="#">
            <img src="./images/(62).png" class="img2 fl">
        </a>
    </div>




</html>

<script>
    var pid = location.search.split("?")[1].split("=")[1];

    $.ajax({
        url: `/account/search/${pid}`
    }).then(function (res) {
        console.log(res);
        //把当前数据拷贝一份,删除哪些不要的东西
        var copyeObj = Object.assign({}, res)
        delete copyeObj.smallImgs;
        delete copyeObj.price1;
        delete copyeObj.pName1;
        //把copyeObj 保存到 当前的按钮
        $("#add").attr("data-info", JSON.stringify(copyeObj))
        let strHtml = `
       
           <div id="box">
               <div class="middleImg">
                   <img src="${res.pic}" />
                   <div class="middleArea"></div>
               </div>
               <div class="small">
                   <ul>
                       <li><img src="images/images1/${res.smallImgs}-1.jpg" /></li>
                       <li><img src="images/images1/${res.smallImgs}-2.jpg" /></li>
                       <li><img src="images/images1/${res.smallImgs}-3.jpg" /></li>
                       <li><img src="images/images1/${res.smallImgs}-4.jpg" /></li>
                       <li><img src="images/images1/${res.smallImgs}-5.jpg" /></li>
                   </ul>
               </div>
               <div class="bigArea">
                   <img class="bigImg" src="${res.pic}" />
               </div>
               <div class="logo2"><img src="./images/双11.png" alt=""></div>
               <div class="logo3"><img src="./images/Snipaste_2021-10-28_11-29-33.jpg" alt=""></div>
               <p class="txt1"> 收藏&nbsp;|&nbsp;分享</p>
           </div>
   
   
   
           <div class="txtlist ">
               <p class="title">${res.pName1}</p>
               <div class="upper_xuyan">满天星璀璨镶钻星空表盘，展现女神优雅气质，选用钢和金钢混合精制而成，表盘饰以星空般的水晶点缀。蝴蝶双按扣，佩戴便捷。<span
                       class="js_more CUSTOMER-SERVICE">咨询优惠</span></div>
   
               <div class="upper_model clearfix">
                   <div class="fl upper_model_a"><span>型号:</span><span>AR1926</span></div>
                   <div class="fl upper_model_b"><span>编号:</span><span>51784</span></div>
                   <div class="fl upper_model_c"><span>品牌:</span><span>阿玛尼</span></div>
                   <div class="fr upper_model_d"><span>销量:</span><span>1735</span></div>
               </div>
   
               <div class="boximg"><img src="${res.price1}" alt="">
   
                   <div class="imgbox"><img src="./images/$.jpg" alt=""></div>   
   
   
               </div>
               <div class="upper_give clearfix">
                   <div class="upper_give_left fl">配送</div>
                   <div class="upper_give_right fl"><i>（顺丰包邮）</i> 17:30前支付，预计1-3个工作日内发货，支持货到付款 </div>
               </div>
               <div class="promise clearfix">
                   <div class="left fl">承诺</div>
                   <div class="right fl">
                       <li class="fl"><i></i> <span class="">正品保障</span>
                           <div class="popup" style="display: none;">全站自营直采，高于瑞士国家标准的进出仓全检机制，万表10年零假货投诉。</div>
                       </li>
                       <li class="fl"><i></i> <span class="">正规发票</span>
                           <div class="popup" style="display: none;">提供国家税务局认可的正规发票，具有售后维权法律效力。</div>
                       </li>
                       <li class="fl"><i></i> <span class="">假一赔三</span>
                           <div class="popup" style="display: none;">万表自营新表10年累计交易超50万枚腕表，正品无假货，如有售假三倍赔偿。</div>
                       </li>
                       <li class="fl"><i></i> <span class="">7天退换</span>
                           <div class="popup" style="display: none;">无理由退换：撕开贴膜及特卖、预售、定制等商品不支持；质量退换：非人为机芯故障或商品制造缺陷</div>
                       </li>
                       <li class="fl"><i></i> <span class="">全球联保</span>
                           <div class="popup" style="display: none;">800+家售后服务点，完善的售后保障，可享受品牌全球联保服务。</div>
                       </li>
                       <li class="fl"><i></i> <span class="">实体体验</span>
                           <div class="popup" style="display: none;">多家线下体验中心，互联网+新零售。</div>
                       </li>
                       <li class="fl"><i></i> <span class="">闪电发货</span>
                           <div class="popup" style="display: none;">每天17：30前下单，可当天发货。</div>
                       </li>
                       <li class="fl"><i></i> <span class="">货到付款</span>
                           <div class="popup" style="display: none;">收到货验货后再支付，可刷卡、现金、转账。</div>
                       </li>
                   </div>
               </div>
   
               <div class="service clearfix">
                   <div class="left fl">服务</div>
                   <div class="right fl"> <a class="fl" href="./首页.html" target="_blank"><span>万表名匠提供全国联保</span></a> <a class="fl" href="./login.html"
                           target="_blank"><span>100%正品二手表库</span><i class="icon-d-new_choice"></i></a> </div>
                   <div class="servicePopup">该产品享有2年名匠保修服务</div>
               </div>
   
               <div class="upper_style clearfix">
                   <div class="upper_style_left fl">款式</div>
                   <div class="upper_style_right fl"> <a href="/goods/51783" class="fl "><span
                               class="upper_style_right_img fl"><img src="./images/dmjpg.jpg" alt=""></span> <span
                               class="upper_style_right_text fl">钢 白色 镶钻 不锈钢</span> </a> <a href="/goods/51784"
                           class="fl upper_style_right_action"><span class="upper_style_right_img fl"><img
                                   src="./images/dmjpg.jpg" alt=""></span> <span class="upper_style_right_text fl">钢 白色 镶钻
                               不锈钢</span>
                           <div class="tag icon-a-o-arrow-black"></div>
                       </a> <a href="/goods/75917" class="fl "><span class="upper_style_right_img fl"><img
                                   src="./images/dmjpg.jpg" alt=""></span> <span class="upper_style_right_text fl">不锈钢
                               白色</span> </a> </div>
               </div>
   
   
               <div class="upper_number clearfix">
                   <div class="upper_number_left fl">数量</div>
                   <div class="upper_number_right fl">
                       <div class="upper_number_right_a fl"> <span class="fl reduce" data-type="subtract" id="btn1">-</span> <input
                               type="text" value="1" class="cont fl" id="count" data-realcount="2" data-virtualcount="33"
                               onkeyup="this.value=this.value.replace(/[^\d]/g,'') "
                               onafterpaste="this.value=this.value.replace(/[^\d]/g,'')"> <span class="fl plus"
                               data-type="add" data-saletype="3" id="btn">+</span></div>
                   </div>
                   <div class="upper_number_count fl">库存紧张</div>
               </div>
               <div class="upper_button clearfix">
                   <div class="upper_button_a page fl js_purchase">立即购买</div>
                   
                      
               
                   <div class="qr-code fl">
                       <div class="icon"> <img src="./images/ewm5.png" alt=""></div>
                       <em class="text">点击领优惠</em>
                       <div class="qr-code-popup">
                           <div class="qr-code-container first"> <img src="./images/wb.jpeg"  alt="">
                               <e class="qr-code-tip">扫码下单更优惠</e>
                           </div>
                           <div class="qr-code-container second"> </div>
                       </div>
                   </div>
               </div>
           </div>
           
       `


        $(".content").html(strHtml)
        $(".small ul li").on("mousemove", function () {
            var $index = $(this).index()
            $(".middleImg  img").attr("src", `images/images1/${res.smallImgs}-${$index + 1}.jpg`);
            $(".bigImg").attr("src", `images/images1/${res.smallImgs}-${$index + 1}.jpg`);

        })
    })

    $(function () {
        $("#add").on("click", function () {
            //    console.log( $(this).attr("data-info"));
            //$("xx").data()专门取自定义属性的值
            // console.log($(this).data("info"));

            let u_Id = JSON.parse(localStorage.getItem("userinfo") || '{}').u_id;
            console.log(u_Id);
            let number = $("#count").val();
            // 商品id,商品名称,商品单击,商品数量,购买人
            //购买人  利用 Object.assign  合并2个对象
            var oList = Object.assign($(this).data("info"), { u_Id, number });
            console.log(oList);

            //
            $.ajax({

                url: "/account/addCart",
                type: 'post',
                data: oList
            }).then(function (res) {
                layer.msg(res.msg);

            })
        })

    })



    $(".content").on("click", "#btn", function () {
        var num = $(this).prev().val();
        console.log(num);
        num++;
        $(this).prev().val(num);
        /*  var price = $(this).parent().prev().html().substring(1);
         //小计
         var result = calPrice(num, price);
         $(this).parent().next().html('&yen;' + result);
         TotalPrice();
         console.log(this); */
    })
    /* $(".content").on("click", "#js_cart", function () {
        location = "./cart/cart.html"
    }) */

    $(".content").on("click", "#btn1", function () {
        var num = $(this).next().val();
        if (num == 1) {
            //判断删除
            var flag = confirm('东西这么好  不要了吗吊毛？');
            if (flag) {
                $(this).parent().parent().remove();
            }
        } else {
            num--;
            //更新赋值
            $(this).next().val(num);
            /* //单价  price
            var price = $(this).parent().siblings('.price').html().substring(1);
            var result = calPrice(num, price);
            //更新赋值
            $(this).parent().next().html('&yen;' + result); */
        }


    })


</script>